package loja.controller.editor;

import loja.model.entity.produto.Categoria;
import loja.model.handler.HandlerViewEntity;
import loja.model.handler.impl.CategoriaHandlerView;
import loja.model.service.persitence.dao.IDao;
import loja.model.service.persitence.dao.entity.impl.CategoriaDao;
import loja.view.editor.components.frame.CategoriaFrameEditor;
import loja.view.editor.components.frame.EntityFrameEditor;

/**
 * @author David Luiz
 * 
 */
public class ListenerCategoriaFrameEditor extends
		ListenerFrameEditor<Categoria, Integer> {

	public ListenerCategoriaFrameEditor() {
		super(Categoria.class);
	}

	@Override
	protected IDao<Categoria, Integer> createEntityDao() {
		return new CategoriaDao();
	}

	@Override
	protected EntityFrameEditor<Categoria, Integer> createEntityFrameEditor() {
		return new CategoriaFrameEditor(handlerViewEntity);
	}

	@Override
	protected HandlerViewEntity<Categoria, Integer> createHandlerViewEntity() {
		return new CategoriaHandlerView();
	}

}
